layui.define(["table", "form", "admin"], function (exports) {
    var $ = layui.$,
        table = layui.table,
        form = layui.form;

    table.render({
        elem: '#LAY-livehistory-manage'
        , url: '/admin/question/ajax_rank'
        , cols: [[
            { field: 'id', title: 'ID', width: 100, fixed: "left" }
            , { field: 'anchor_id', title: '主播ID', width: 100, fixed: "left" }
            , { field: 'anchor_name', title: '主播名称', width: 100, fixed: "left" }
            , { field: 'title', title: '竞猜标题', width: 300, fixed: "left" }
            , { field: 'match_title', title: '直播标题', width: 300 },
            , { field: 'joins', title: '参与人数', width: 100 },

            { field: 'create_time', title: '发起时间', width: 180 },
        ]]
        , page: true
        , limit: 20
        , height: 'full-140'
        , text: '对不起，加载出现异常！'
        , even: true
    });

    table.render({
        elem: '#LAY-guser-manage'
        , url: '/admin/question/ajax_user'
        , cols: [[
            // { field: 'id', title: 'ID', width: 100, fixed: "left" }
            , { field: 'uid', title: '用户ID', width: 100, fixed: "left" }
            , { field: 'name', title: '用户名称', width: 150, fixed: "left" }
            , { field: 'count', title: '参与次数', width: 100, fixed: "left" }
            , { field: 'times', title: '胜场', width: 100, fixed: "left" }
            , { field: 'rotia', title: '胜率', width: 100, fixed: "left" }
            , { field: 'profit', title: '总收入', width: 100 },
            , { field: 'amount', title: '总投入', width: 100 },
            , { field: 'sum', title: '差额', width: 100 },
            // { field: 'create_time', title: '日期', width: 180 },

        ]]
        , page: true
        , limit: 20
        , height: 'full-140'
        , text: '对不起，加载出现异常！'
        , even: true
    });


    exports("guess_rank", {});
});
